<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>原生js操作</title>
</head>

<body>
    <ul id="myul">
      
    </ul>
    <script>
        let arr = ["春天", "夏天", "秋天", "冬天"];
        let myul = document.getElementById("myul")
        console.log(myul);
        for (let i = 0; i < arr.length; i++) {
            let li=document.createElement("li");
            li.innerHTML=arr[i]
            myul.appendChild(li)
        }
    </script>
</body>

</html>